package com.ruoyi.system.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import com.ruoyi.system.domain.OtherManualMicOrderRecord;
import com.ruoyi.system.domain.OtherMicSlotClaim;
import com.ruoyi.system.domain.vo.StaticsMicroDataRspVo;
import com.ruoyi.system.domain.vo.StaticsReq;
import com.ruoyi.system.mapper.OtherManualMicOrderRecordMapper;
import com.ruoyi.system.mapper.OtherMicSlotClaimMapper;
import com.ruoyi.system.service.IOtherManualMicOrderRecordService;
import com.ruoyi.system.service.IOtherMicSlotClaimService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
@DataSource(value = DataSourceType.SLAVE)
public class OtherMicSlotClaimServiceImpl extends ServiceImpl<OtherMicSlotClaimMapper, OtherMicSlotClaim> implements IOtherMicSlotClaimService {

    @Resource
    private OtherMicSlotClaimMapper otherMicSlotClaimMapper;


    @DataSource(value = DataSourceType.SLAVE)
    public List<HashMap> getMicSlotClaim(String roomId, String startDate, String endDate, String startTime, String endTime) {

        return otherMicSlotClaimMapper.getMicSlotClaim(roomId, startDate, endDate, startTime, endTime);
    }

    @DataSource(value = DataSourceType.SLAVE)
    public List<OtherMicSlotClaim> getOtherMicSlotClaimByMember(String roomId, String wxid, String startDate, String endDate, String startTime, String endTime) {
        return otherMicSlotClaimMapper.getOtherMicSlotClaimByMember(roomId, wxid, startDate, endDate, startTime, endTime);
    }


    @DataSource(value = DataSourceType.SLAVE)
    public List<Map<String, Object>> getMemberLastRecord( QueryWrapper<OtherMicSlotClaim> queryWrapper){
        return otherMicSlotClaimMapper.getMemberLastRecord(queryWrapper);
    }


}
